package com.tiany.java_study;

public class Person {

    //属性 Field 域 字段 成员变量
    String name;
    int age;
    boolean isMale;
    String thing;//测试this用

    //方法 成员方法 函数 method
    public void eat(String food) {
        System.out.println(this.name + " is eating " + food);
        System.out.println(name + " is eating " + food);
    }

    public void sleep() {
    }

    public void talk(String thing) {
        System.out.println(name + " said " + this.thing);
        System.out.println(name + " said " + thing);
    }

}